package team.you.ticket.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import team.you.ticket.pojo.TrainNum;

public interface TrainNumMapper {
    int deleteByPrimaryKey(String id);

    int insert(TrainNum record);

    TrainNum selectByPrimaryKey(String id);

    List<TrainNum> selectAll(@Param("page") Integer page,@Param("limit") Integer limit);

    int updateByPrimaryKey(TrainNum record);

    Integer getCount();

    Integer updateByKey(@Param("id") String id, @Param("value") String value, @Param("field") String field);

    List<TrainNum> selectAll1(@Param("page") Integer page, @Param("limit") Integer limit, @Param("starSite") String starSite,
                              @Param("endSite") String endSite);

    Integer getCount1(@Param("starSite") String starSite, @Param("endSite") String endSite);

    List<TrainNum> selectByLike(@Param("value") String value,@Param("type") Integer type,@Param("page") Integer page,@Param("limit") Integer limit);

    List<TrainNum> selectByTime(@Param("beginTime") String beginTime, @Param("endTime") String endTime);
    //购票成功后，人数减一
    Integer updateByPopleNum(@Param("id") String id, @Param("popleNum") Integer popleNum);
}